<template>
    <div>
        <el-table :data="tableData" border style="width: 100%" class="list">
            <el-table-column prop="nickname" label="用户昵称" width="100"></el-table-column>
            <el-table-column prop="description" label="特产描述" width="200"></el-table-column>
            <el-table-column prop="stars" label="评分" width="50"></el-table-column>
            <el-table-column prop="content" label="评论" width="600"></el-table-column>
            <el-table-column prop="time" label="评论时间" width="150"></el-table-column>
            <!-- <el-table-column label="操作">
                <template slot-scope="scope">
                    <el-button size="small" @click="$emit('change',scope.$index)">编辑</el-button>
                </template>
            </el-table-column> -->
        </el-table>
    </div>
</template>

<script>
export default {
    name: "rateList",
    props: ["rateList"],
    computed: {
        tableData: function() {
            return this.rateList.filter((item, index) => {
                // if (item.status == 1) {
                //     item.status = "已领取";
                // } else if (item.status == 0) {
                //     item.status == "未领取";
                // }else if (item.status == 2) {
                //     item.status == "已领取";
                // }
                item.index = index;
                return true;
            });
        }
    },
    methods: {
        handleEdit(index, row) {
            alert(index, row);
        }
    }
};
</script>

<style lang="scss" scopted>
*{
    text-align: center
}
.list {
    height: 70vh;
    overflow-y: scroll;
    text-align: center;
    &::before {
        display: none;
    }
}
</style>